package com.qulei.demo.db.dao;

import java.util.List;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public interface DBBaseDao<T> {

	long insert(SQLiteDatabase db, T t);

	int update(SQLiteDatabase db, T t, String whereClause, String[] whereArgs);

	int delete(SQLiteDatabase db, String whereClause, String[] whereArgs);

	List<T> select(SQLiteDatabase db, String selection, String[] selectionArgs,
			String groupBy, String having, String orderBy, String limit);

	List<T> selectBySql(SQLiteDatabase db, String sql, String[] selectionArgs);

	void closeCursor(Cursor cursor);

	void onCreateDataBase(SQLiteDatabase db);

	void ononUpgradeDataBase(SQLiteDatabase db, int oldVersion, int newVersion);
}
